1. Field of the Invention
The present invention relates to a communication device that performs wireless communication and a method of correcting the same, and more particularly, to a communication device that performs correction of an error generated in clocking a super frame period and a method of correcting the same.
2. Description of Related Art
In a communication mode by WUSB, in which the USB communication is made wireless using Ultra Wide Band (UWB), a plurality of WUSB devices are connected around one WUSB host. Such a WUSB host and WUSB device perform wireless communication based on a period called super frame, which is defined in the WiMedia standard. Accordingly, there is a need to make correspondence of the super frame of the WUSB host and the WUSB device to the period defined in the WiMedia standard. In the WiMedia standard, the accuracy allowable range of the super frame timer that clocks the super frame period is defined to be 20 ppm.
Accordingly, the WUSB host and the WUSB device complied with the WiMedia standard need to operate each super frame timer within the accuracy allowable range. When the accuracy of the super frame timer has the value outside the accuracy allowable range, communication collision may occur with other WUSB devices, which causes damage in data transfer. In order to prevent this, each super frame timer needs to be corrected in a way that the accuracy of each super frame timer of the WUSB host and the WUSB device is within the accuracy allowable range.
For example, the super frame timer is controlled based on a system clock signal. Further, the accuracy of the system clock signal depends on an external crystal oscillator. When the accuracy of the external crystal oscillator decreases, the accuracy of the system clock signal decreases as well. This results in decrease of the accuracy of the super frame timer, and the accuracy may be out of the accuracy allowable range.
One of the methods for correcting the accuracy of the super frame timer includes a method of changing the external crystal oscillator. In this method, the load capacitance is calculated on paper after determining a board circuit, and the external crystal oscillator that matches the load capacitance is mounted on the board circuit. Note that the oscillation frequency itself of the external crystal oscillator is determined by the characteristics of the crystal oscillator.
Furthermore, there is a method of correcting a ratio value R of a register to a proper value using an external measurement device as a method of correcting the accuracy of the super frame timer by software. The ratio value R is the value that sets the ratio of a natural period (fixed cycle) of the super frame timer and the system clock. In correcting the super frame timer, a difference value (65539 us−65536 us=3 us, for example) that indicates how much the super frame period (65539 us, for example) of the WUSB host measured by the external measurement device is deviated from the standard value (65536 us) is calculated first. Then, the optimal ratio value R is calculated using the difference value, and set in a serial ROM as an initial value. Further, it is checked whether the super frame period is corrected to the expectation value using the external measurement device again.
On the other hand, Japanese Unexamined Patent Application Publication No. 2004-282264 discloses a mobile phone capable of automatically performing an RTC correction based on a frequency error calculated by comparing a clock signal from an RTC with a clock signal from a reference clock generator.
However, the present inventors have found a problem as follows. That is, the correction method of changing the external crystal oscillator needs operation such as soldering or replacement of the external crystal oscillator, which increases the burden for a user. Further, the correction method by software needs measurement by the external measurement device in calculating the difference value, which means this method is subjected to the constraints by the external measurement device. Furthermore, the calculation processing by human being is required in calculating the final ratio value R, which increases the burden for the user. The RTC correction is performed in the mobile phone disclosed in Japanese Unexamined Patent Application Publication No. 2004-282264; however, there is no description regarding the error correction of the super frame period clocked by the super frame timer.